import { request } from '@/request'
/**
 * 登录
 */
export function fetchLogin(data: { enStr: string; uuid: string }) {
  return request.post<any>('/login', data, {
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
/**
 * 登出
 */
export function fetchLogout(token: string) {
  return request.post<any>('/logout', token)
}
/**
 * 获取图形验证码，其中uuid用于加密登录
 */
export function getVerifyCode() {
  return request.get<{
    base64: string
    uuid: string
  }>('/verifyCode?restful=true')
}
